package com.video.service.impl;

import com.video.dao.SubjectMapper;
import com.video.entity.Subject;
import com.video.service.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SubjectServiceImpl implements SubjectService {

    @Autowired
    private SubjectMapper subjectMapper;
    @Override
    public List<Subject> findAll() {
        return subjectMapper.selectByExample(null);
    }

    @Override
    public Subject findById(Integer id) {
        return subjectMapper.selectByPrimaryKey(id);
    }

    @Override
    public Subject queryBySid(Integer id) {
        return subjectMapper.queryBySid(id);
    }
}
